- head.S | 34 ++++++++++++++++++++++++++++++++++
- 1 files changed, 34 insertions(+)
-
-Index: linux-2.6.11-xendiffs/arch/ia64/kernel/head.S
-===================================================================
---- linux-2.6.11-xendiffs.orig/arch/ia64/kernel/head.S 2005-04-07 10:56:19.225128582 -0500
-+++ linux-2.6.11-xendiffs/arch/ia64/kernel/head.S 2005-04-07 11:00:21.718513399 -0500
-@@ -1,3 +1,8 @@
-+#ifdef XEN
-+#define console_print printf
-+#define kernel_thread_helper 0
-+#define sys_exit 0
-+#endif
- /*
- * Here is where the ball gets rolling as far as the kernel is concerned.
- * When control is transferred to _start, the bootload has already
-@@ -187,7 +192,11 @@ start_ap:
+--- ../../linux-2.6.11/arch/ia64/kernel/head.S 2005-03-02 00:38:13.000000000 -0700
++++ arch/ia64/head.S 2005-04-28 10:51:19.000000000 -0600
+@@ -187,7 +187,11 @@
dep r18=0,r3,0,12
;;
or r18=r17,r18
;;
mov r17=rr[r2]
shr.u r16=r3,IA64_GRANULE_SHIFT
-@@ -227,7 +236,11 @@ start_ap:
+@@ -227,7 +231,11 @@
;;
mov ar.rsc=0x3 // place RSE in eager mode
(isBP) movl r2=ia64_boot_param
;;
(isBP) st8 [r2]=r28 // save the address of the boot param area passed by the bootloader
-@@ -245,7 +258,21 @@ start_ap:
- br.call.sptk.many rp=sys_fw_init
- .ret1:
- #endif
-+#ifdef XEN
-+ alloc r2=ar.pfs,8,0,2,0
-+ ;;
-+#define fake_mbi_magic 0
-+#define MULTIBOOT_INFO_SIZE 1024
-+ .rodata
-+fake_mbi:
-+ .skip MULTIBOOT_INFO_SIZE
-+ .previous
-+ movl out0=fake_mbi
-+ ;;
-+ br.call.sptk.many rp=cmain
-+#else
- br.call.sptk.many rp=start_kernel
-+#endif
- .ret2: addl r3=@ltoff(halt_msg),gp
- ;;
- alloc r2=ar.pfs,8,0,2,0
-@@ -254,7 +281,9 @@ start_ap:
+@@ -254,7 +262,9 @@
br.call.sptk.many b0=console_print
self: hint @pause
END(_start)
GLOBAL_ENTRY(ia64_save_debug_regs)
-@@ -850,7 +879,12 @@ END(ia64_delay_loop)
+@@ -850,7 +860,11 @@
* intermediate precision so that we can produce a full 64-bit result.
*/
GLOBAL_ENTRY(sched_clock)
+#ifdef XEN
-+ break 0;; // FIX IA64_CPUINFO_NSEC_PER_CYC_OFFSET
-+ //movl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET
++ movl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET
+#else
addl r8=THIS_CPU(cpu_info) + IA64_CPUINFO_NSEC_PER_CYC_OFFSET,r0
+#endif
#cp_patch mm/slab.c arch/ia64/slab.c slab.c
# following renamed to avoid conflict
-cp_patch kernel/extable.c arch/ia64/linuxextable.c linuxextable.c
+#cp_patch kernel/extable.c arch/ia64/linuxextable.c linuxextable.c
+softlink kernel/extable.c arch/ia64/linuxextable.c
cp_patch arch/ia64/mm/contig.c arch/ia64/mm_contig.c mm_contig.c
cp_patch arch/ia64/mm/tlb.c arch/ia64/tlb.c tlb.c
cp_patch arch/ia64/hp/sim/hpsim_ssc.h include/asm-ia64/hpsim_ssc.h hpsim_ssc.h
-cp_patch include/asm-ia64/current.h include/asm-ia64/current.h current.h
+#cp_patch include/asm-ia64/current.h include/asm-ia64/current.h current.h
+softlink include/asm-ia64/current.h include/asm-ia64/current.h
#cp_patch include/asm-ia64/gcc_intrin.h include/asm-ia64/gcc_intrin.h gcc_intrin.h
softlink include/asm-ia64/gcc_intrin.h include/asm-ia64/gcc_intrin.h
cp_patch include/asm-ia64/hardirq.h include/asm-ia64/hardirq.h hardirq.h
cp_patch include/asm-ia64/kregs.h include/asm-ia64/kregs.h kregs.h
cp_patch include/asm-ia64/page.h include/asm-ia64/page.h page.h
cp_patch include/asm-ia64/processor.h include/asm-ia64/processor.h processor.h
-cp_patch include/asm-ia64/sal.h include/asm-ia64/sal.h sal.h
+#cp_patch include/asm-ia64/sal.h include/asm-ia64/sal.h sal.h
+softlink include/asm-ia64/sal.h include/asm-ia64/sal.h
cp_patch include/asm-ia64/system.h include/asm-ia64/system.h system.h
cp_patch include/asm-ia64/types.h include/asm-ia64/types.h types.h
cp_patch include/linux/interrupt.h include/asm-ia64/linux/interrupt.h interrupt.h
cp_patch include/linux/mmzone.h include/asm-ia64/linux/mmzone.h mmzone.h
-cp_patch include/linux/wait.h include/asm-ia64/linux/wait.h wait.h
+#cp_patch include/linux/wait.h include/asm-ia64/linux/wait.h wait.h
+softlink include/linux/wait.h include/asm-ia64/linux/wait.h
-cp_patch include/linux/slab.h include/asm-ia64/slab.h slab.h
+#cp_patch include/linux/slab.h include/asm-ia64/slab.h slab.h
# following renamed to avoid conflict
cp_patch include/linux/time.h include/xen/linuxtime.h linuxtime.h
dummy();
}
-// accomodate linux extable.c
-//const struct exception_table_entry *
-void *search_module_extables(unsigned long addr)
+///////////////////////////////
+// called from arch/ia64/head.S
+///////////////////////////////
+
+void console_print(char *msg)
{
- return NULL;
+ printk("console_print called, how did start_kernel return???\n");
}
-void *module_text_address(unsigned long addr)
+void kernel_thread_helper(void)
{
- return NULL;
+ printk("kernel_thread_helper not implemented\n");
+ dummy();
}
+void sys_exit(void)
+{
+ printk("sys_exit not implemented\n");
+ dummy();
+}
+
+
+
+// accomodate linux extable.c
+//const struct exception_table_entry *
+void *search_module_extables(unsigned long addr) { return NULL; }
+void *__module_text_address(unsigned long addr) { return NULL; }
+void *module_text_address(unsigned long addr) { return NULL; }
+
void cs10foo(void) {}
void cs01foo(void) {}
/******************************************************************************
- * kernel.c
- *
- * This file should contain architecture-independent bootstrap and low-level
- * help routines. It's a bit x86/PC specific right now!
- *
- * Copyright (c) 2002-2003 K A Fraser
+ * xensetup.c
+ * Copyright (c) 2004-2005 Hewlett-Packard Co
+ * Dan Magenheimer <dan.magenheimer@hp.com>
*/
-//#include <stdarg.h>
#include <xen/config.h>
#include <xen/lib.h>
#include <xen/errno.h>
//#include <xen/console.h>
//#include <xen/serial.h>
#include <xen/trace.h>
-//#include <asm/shadow.h>
-//#include <asm/io.h>
-//#include <asm/uaccess.h>
-//#include <asm/domain_page.h>
-//#include <public/dom0_ops.h>
#include <asm/meminit.h>
#include <asm/page.h>
char opt_leveltrigger[30] = "", opt_edgetrigger[30] = "";
/*
* opt_xenheap_megabytes: Size of Xen heap in megabytes, including:
- * xen image
+ * xen image
* bootmap bits
* xen heap
* Note: To allow xenheap size configurable, the prerequisite is
(*call)();
}
-void cmain(multiboot_info_t *mbi)
+void start_kernel(void)
{
unsigned char *cmdline;
- module_t *mod = (module_t *)__va(mbi->mods_addr);
void *heap_start;
int i;
unsigned long max_mem, nr_pages, firsthole_start;
xen_pstart = ia64_tpa(KERNEL_START);
/* Must do this early -- e.g., spinlocks rely on get_current(). */
- set_current(&idle0_exec_domain);
+ //set_current(&idle0_exec_domain);
+ ia64_r13 = (void *)&idle0_exec_domain;
idle0_exec_domain.domain = &idle0_domain;
early_setup_arch(&cmdline);
/* We initialise the serial devices very early so we can get debugging. */
serial_init_stage1();
- init_console();
+ init_console();
set_printk_prefix("(XEN) ");
/* xenheap should be in same TR-covered range with xen image */
ia64_boot_param->initrd_size);
ia64_boot_param->initrd_start = initial_images_start;
printk("Done\n");
-
+
/* first find highest page frame number */
max_page = 0;
efi_memmap_walk(find_max_pfn, &max_page);
efi_memmap_walk(filter_rsvd_memory, init_boot_pages);
efi_memmap_walk(xen_count_pages, &nr_pages);
- printk("System RAM: %luMB (%lukB)\n",
+ printk("System RAM: %luMB (%lukB)\n",
nr_pages >> (20 - PAGE_SHIFT),
nr_pages << (PAGE_SHIFT - 10));
{
int i;
for (i = 0; i < CLONE_DOMAIN0; i++) {
- clones[i] = do_createdomain(i+1, 0);
+ clones[i] = do_createdomain(i+1, 0);
if ( clones[i] == NULL )
panic("Error creating domain0 clone %d\n",i);
}
set_bit(DF_PRIVILEGED, &dom0->d_flags);
-//printk("About to call shadow_mode_init()\n");
-// shadow_mode_init();
-
/*
* We're going to setup domain0 using the module(s) that we stashed safely
* above our heap. The second module, if present, is an initrd ramdisk.
// avoid redefining task_t in asm/thread_info.h
#define task_t struct domain
+// avoid redefining task_struct in asm/current.h
+#define task_struct exec_domain
+
// linux/include/asm-ia64/machvec.h (linux/arch/ia64/lib/io.c)
#define platform_inb __ia64_inb
#define platform_inw __ia64_inw
unsigned long end;
};
-// from linux/include/linux/module.h
-
// warning: unless search_extable is declared, the return value gets
// truncated to 32-bits, causing a very strange error in privop handling
struct exception_table_entry;
#define ARCH_HAS_EXEC_DOMAIN_MM_PTR
-// see arch/x86/nmi.c !?!?
+// from include/linux/preempt.h (needs including from interrupt.h or smp.h)
+#define preempt_enable() do { } while (0)
+#define preempt_disable() do { } while (0)
// these declarations got moved at some point, find a better place for them
extern int opt_noht;